import request from '@/config/axios'

export interface MatchmakerVO {
  id?: number
  no: string
  supplyPrice: string
  matchmakerCover: string
  productIntroduct: string
  status: string
}

// 查询红娘商品列表
export const getMatchmakerPage = async (params) => {
  return await request.get({ url: `/maker/matchmaker-product-info/page`, params })
}

// 查询红娘商品详情
export const getMatchmaker = async (id: number) => {
  return await request.get({ url: `/maker/matchmaker-product-info/get?id=` + id })
}

// 新增红娘商品
export const createMatchmaker = async (data: MatchmakerVO) => {
  return await request.post({ url: `/maker/matchmaker-product-info/create`, data })
}

// 修改红娘商品
export const updateMatchmaker = async (data: MatchmakerVO) => {
  return await request.put({ url: `/maker/matchmaker-product-info/update`, data })
}

// 删除红娘商品
export const deleteMatchmaker = async (id: number) => {
  return await request.delete({ url: `/maker/matchmaker-product-info/delete?id=` + id })
}

// 导出红娘商品 Excel
export const exportMatchmaker = async (params) => {
  return await request.download({ url: `/maker/matchmaker-product-info/export-excel`, params })
}
